package xyc.szk.eljstl.pojo;

public class Users {
    private int id; //这个是类的成员变量  也称之为属性 ，实际上这个不一定是属性名称 ：应该是getId方法中get
    //后面的字符串，且该 字符串的第一字母是小写 即id才是该类的属性名称
    private String userName;
    private String userPwd;
    private int age;
    //无参的构造方法（默认存在）
    public Users(){}

    public Users(int id, String userName, String userPwd, int age) {
        this.id = id;
        this.userName = userName;
        this.userPwd = userPwd;
        this.age = age;
    }

    public int getId() { //这个类的成员 方法  id1 才是属性名称
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPwd() {
        return userPwd;
    }

    public void setUserPwd(String userPwd) {
        this.userPwd = userPwd;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Users{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", userPwd='" + userPwd + '\'' +
                ", age=" + age +
                '}';
    }
}
